package com.example.e_comm.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;


@Data
@TableName
public class Permission {

    public String getPermName() {
        return permName;
    }

    public String getPermKey() {
        return permKey;
    }
//13-19行Permissioncontroller修改添加的


    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @TableId(type = IdType.AUTO)
    private long id;
    @TableField(value = "perm_name")
    private String permName; //权限名称：例如：READ-读取权限
    @TableField(value = "perm_key")
    private String permKey;//权限校验

    @TableLogic(value = "0",delval = "1")
    private Integer deleted;//0：1：

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime= LocalDateTime.now();
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime = LocalDateTime.now();
}
